package com.zhuojy.equity.mall.admin.web.controller.car;


import com.zhuojy.equity.mall.admin.common.entity.po.car.TCarMaintainerPO;
import com.zhuojy.equity.mall.admin.common.pojo.ResultEntity;
import com.zhuojy.equity.mall.admin.service.car.TCarMaintainerService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author xrz
 * @version 1.0
 * @description:TODO
 * @date 2024/4/8 19:50
 */
@RestController
@RequiredArgsConstructor
@CrossOrigin
@RequestMapping("carmaintainer")
public class TCarMaintainerController {
    @Autowired
    private TCarMaintainerService tCarMaintainerService;


    @RequestMapping("findCarcheerPagination")
    private ResultEntity findCarcheerPagination(@RequestBody TCarMaintainerPO tCarMaintainPO, @RequestParam("pageSize") Integer pageSize, @RequestParam("pageNum") Integer pageNum){
        return tCarMaintainerService.findCarcheerPagination(tCarMaintainPO,pageSize,pageNum);
    }


    @RequestMapping("delMaintainer")
    private ResultEntity delMaintain(@RequestParam("id")Integer id){
        return tCarMaintainerService.delMaintain(id);
    }


    @RequestMapping("addMaintainer")
    private ResultEntity addMaintain(@RequestBody TCarMaintainerPO tCarMaintainPO){
        return tCarMaintainerService.addMaintain(tCarMaintainPO);
    }

    @RequestMapping("echoMaintainer")
    private ResultEntity echoMaintain(@RequestParam("id") Integer id){
        return tCarMaintainerService.echoMaintain(id);
    }


    @RequestMapping("upMaintainer")
    private ResultEntity upMaintain(@RequestBody TCarMaintainerPO tCarMaintainPO){
        return tCarMaintainerService.upMaintain(tCarMaintainPO);
    }
}
